home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
034a
/
twview82.zip
/
STATISTC.INC
< prev
next >
Wrap
Text File
|
1991-02-04
|
1KB
|
42 lines
function CountDist( howfar : integer ):integer;
var
c : integer;
s : sector;
begin
c := 0;
for s := 1 to maxSector do
if distances[ s ].d <= howfar then
c := c + 1;
countDist := c;
end; {CountDist}
procedure StellarDispersion;
const
maxDispersion = 29;
var
s : sector;
disperse : array [0..maxDIspersion] of integer;
temp,
lost : integer;
begin
write( 'Stellar dispersion from what sector? ');
readln( s );
FixDistances( s, distances );
for temp := 0 to maxDispersion do
disperse[ temp ] := 0;
lost := 0;
for s := 1 to maxSector do
if distances[s].d < maxint then
disperse[ distances[ s ].d ] := disperse[ distances[ s ].d ] + 1
else if space.sectors[s].number > 0 then { visited, but not connected?}
lost := lost + 1;
for temp := 0 to maxDispersion do
begin
write( disperse[ temp ] : 5 );
if temp mod 10 = 9 then
writeln;
end;
writeln('There are ', lost, ' unreachable sectors.');
end;